package com.example.tigering.dao;

import com.example.tigering.domain.Material;
import com.example.tigering.domain.MaterialQC;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: xwg
 * @CreateDate: 2023/8/21
 */

@Mapper
public interface MaterialMapper {
    int insert(@Param("m") Material material);

    int insertMany(@Param("ms") List<Material> materials);

    //    List<Material> selectAll();
    int update(@Param("m") Material material);

    //
    int deleteById(@Param("id") String materialCode);

    Material findById(@Param("id") String materialCode);

    List<Material> query(@Param("pageStart") Integer pageStart,@Param("pageSize") Integer pageSize,@Param("price") Integer price);

    List<Material> dynamicQuery(@Param("qc") MaterialQC materialQC);
}
